package STUDENT.TranMinhVu.OOPS.ExerciseLV2.EvenOdd;

public class Models {
	//Kiem tra chan
	public boolean Iseven(MyInteger objvalue){
		if (objvalue.getNumbervalue() % 2==0)
			return true;
		return false;
	}
	public boolean Isodd(MyInteger objvalue){
		if (objvalue.getNumbervalue() % 2==1)
			return true;
		return false;
	}
	public boolean isPrime(MyInteger objvalue){
		int x=0;
		for (int i=1;i< objvalue.getNumbervalue() ;i=i+1){
			if(objvalue.getNumbervalue()%i==0){
				x=x+1;
			}
		}
		if(x == 1){return true;}
		return false;
	}
	public int parseInt(String word){
		return Integer.parseInt(word);
	}
}
